/* 对话框设计系统 - Flink Web Analytics */
:root {
  /* 尺寸变量 */
  --dialog-radius: 12px;
  --input-radius: 8px;
  --button-radius: 8px;
  --dialog-header-padding: 20px 24px;
  --dialog-body-padding: 24px;
  --dialog-footer-padding: 16px 24px;
  
  /* 颜色变量 */
  --dialog-header-bg: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --dialog-footer-bg: #f8f9fa;
  --icon-primary: linear-gradient(135deg, #409eff 0%, #66b3ff 100%);
  --icon-success: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
  --icon-warning: linear-gradient(135deg, #e6a23c 0%, #f0c78a 100%);
  --icon-danger: linear-gradient(135deg, #f56c6c 0%, #f78989 100%);
  --icon-info: linear-gradient(135deg, #909399 0%, #b1b3b8 100%);
}

/* 统一对话框类 */
.unified-dialog {
  /* 对话框圆角 */
  --el-dialog-border-radius: var(--dialog-radius);
}

.unified-dialog .el-dialog__header {
  background: var(--dialog-header-bg);
  border-radius: var(--dialog-radius) var(--dialog-radius) 0 0;
  padding: var(--dialog-header-padding);
  border-bottom: 1px solid #e4e7ed;
}

.unified-dialog .el-dialog__body {
  padding: var(--dialog-body-padding);
  background: #fff;
}

.unified-dialog .el-dialog__footer {
  background: var(--dialog-footer-bg);
  border-radius: 0 0 var(--dialog-radius) var(--dialog-radius);
  padding: var(--dialog-footer-padding);
  border-top: 1px solid #e4e7ed;
}

/* 头部组件样式 */
.dialog-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-icon-primary { background: var(--icon-primary); }
.header-icon-success { background: var(--icon-success); }
.header-icon-warning { background: var(--icon-warning); }
.header-icon-danger { background: var(--icon-danger); }
.header-icon-info { background: var(--icon-info); }

.header-content h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: #303133;
}

.header-content p {
  margin: 0;
  font-size: 14px;
  color: #606266;
}

/* Footer样式 */
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* 分组样式 */
.form-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.form-section:last-child {
  margin-bottom: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.section-title .el-icon {
  color: #409eff;
}

/* 表单优化 */
.unified-dialog .el-form-item {
  margin-bottom: 20px;
}

.unified-dialog .el-form-item__label {
  color: #606266;
  font-weight: 500;
}

.unified-dialog .el-input__wrapper,
.unified-dialog .el-textarea__inner {
  border-radius: var(--input-radius);
  transition: all 0.3s ease;
}

.unified-dialog .el-input__wrapper:hover,
.unified-dialog .el-textarea__inner:hover {
  border-color: #409eff;
}

.unified-dialog .el-input__wrapper.is-focus,
.unified-dialog .el-textarea__inner:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.unified-dialog .el-button {
  border-radius: var(--button-radius);
  font-weight: 500;
}

/* 滚动区域优化 */
.dialog-content {
  max-height: 600px;
  overflow-y: auto;
}

.dialog-content::-webkit-scrollbar {
  width: 8px;
}

.dialog-content::-webkit-scrollbar-thumb {
  background: #dcdfe6;
  border-radius: 4px;
}

.dialog-content::-webkit-scrollbar-thumb:hover {
  background: #c0c4cc;
}

/* 批量对话框下拉弹层 - 确保位于遮罩之上 */
.batch-dialog-select-popper {
  z-index: 3300 !important;
  pointer-events: auto;
  padding: 6px 0;
}

.batch-dialog-select-popper .el-select-dropdown__item {
  padding: 8px 16px;
  line-height: 1.4;
}

:root {
  --dialog-mask-z-index: 2999;
  --dialog-wrapper-z-index: 3300;
}

.el-overlay {
  z-index: var(--dialog-mask-z-index) !important;
}

.el-overlay .el-overlay-dialog,
.el-overlay .el-overlay-dialog .el-dialog {
  z-index: var(--dialog-wrapper-z-index) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .unified-dialog {
    width: 95% !important;
    margin: 10px auto;
  }
  
  .dialog-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .header-icon {
    margin: 0 auto;
  }
  
  .form-section {
    padding: 16px;
  }
  
  .dialog-footer {
    flex-direction: column;
  }
  
  .dialog-footer .el-button {
    width: 100%;
  }
}

